#include <cstring>
#include <iostream>
using namespace std;
#include <fstream>
#include "Ropes.h"

#include "Rope.h"

#include "Field.h"
#include "Pub.h"
#include "ArrayList.cpp"
#include "BinaryList.cpp"



int main(){
	
	ifstream in("bib.bib");

	int i = 0;
	BinaryList<Pub> lib;

	
	
	if (in.is_open())
	{
		char block[3000];
		
		in.ignore(3000, '@');
		while (in.getline(block, 3000, '@'))
		{
			lib.add(Pub(block));

			
			if (i++ == 5){
				
				break;
			}
		}
	}
	else{
		cout << "File not open.";
	}


	for (int j = 0; j < lib.getSize(); ++j)
		cout<<lib.getArray()[j];
	
	
	

	
	
	
	return 0;
}
